This invention related to computer systems, and more particularly to sharing metadata between program units.
A system global cache can serve as a global repository of cached metadata for objects. As requests from clients are received, each request is converted through compilation into a program unit, or cursor. The program unit stores the information needed to execute, including the metadata for the object being acted upon. If the object being accessed is partitioned, the metadata contains information about each partition. The memory needs of the metadata for a partitioned object is proportional in size to the number of object partitions. Therefore, as the number of partitions increases, the metadata storage requirements for the cursor program unit increases. Program unit memory usage can become significant in a system with partitioned objects having a large number of partitions or is a system that receives a large number of requests which access partitioned objects. Significant program unit memory usage can impact scalability.
A system, method, computer program, and article of manufacture for sharing metadata among program units is provided. A metadata object marked as a versioned object can have multiple versions. Program units can share these versions of object metadata as opposed to copying the non-versioned object metadata into their memory. These program units may contain a pointer to an object's metadata but are otherwise void of the metadata information for the object. A locking protocol for the metadata ensures concurrency control and triggers dependency tracking. A locking protocol for the program unit controls cursor dependency status.
A method of sharing metadata can include: receiving a plurality of requests to access a resource, creating a program unit for each of the plurality of requests, creating an execution representation of the metadata object of the resource, and sharing the execution representation of the metadata among the plurality of program units.